package controller;

import java.io.FileWriter;
import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class WeatherData {
	public static void main(String []args){
		
		try {
			Document doc = Jsoup.connect("http://m.naver.com/").get();
			
			for(int i=0; i<doc.getElementsByClass("toif2_l").size(); i++){
				doc.getElementsByClass("toif2_l").get(i).removeAttr("style");
			}
		
			FileWriter out = new FileWriter(
					"E:\\9.NHN SM\\1.workplace\\130523_final\\step10_realtimeInfo\\WebContent\\weather.data");
			out.write(doc.getElementsByClass("toif2_l").get(5).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(6).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(7).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(8).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(9).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(10).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(11).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(12).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(13).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(14).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(15).toString());
			out.write("\n");
			out.write(doc.getElementsByClass("toif2_l").get(16).toString());
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
	}

}
